package com.kim.androidbase.device;

/**
 * 
 * @author yuchen
 * 
 */
public class UserAgent {

	private static StringBuffer userAgentStr;

	/**
	 * 获取设备Agent信息
	 * 
	 * @return
	 */
	public static String getUserAgentStr() {
		if (userAgentStr == null) {
			userAgentStr = new StringBuffer();
			userAgentStr.append("Product: " + android.os.Build.PRODUCT);
			userAgentStr.append(", CPU_ABI: " + android.os.Build.CPU_ABI);
			userAgentStr.append(", TAGS: " + android.os.Build.TAGS);
			userAgentStr.append(", VERSION_CODES.BASE: "
					+ android.os.Build.VERSION_CODES.BASE);
			userAgentStr.append(", MODEL: " + android.os.Build.MODEL);
			userAgentStr.append(", SDK: " + android.os.Build.VERSION.SDK);
			userAgentStr.append(", VERSION.RELEASE: "
					+ android.os.Build.VERSION.RELEASE);
			userAgentStr.append(", DEVICE: " + android.os.Build.DEVICE);
			userAgentStr.append(", DISPLAY: " + android.os.Build.DISPLAY);
			userAgentStr.append(", BRAND: " + android.os.Build.BRAND);
			userAgentStr.append(", BOARD: " + android.os.Build.BOARD);
			userAgentStr.append(", FINGERPRINT: "
					+ android.os.Build.FINGERPRINT);
			userAgentStr.append(", ID: " + android.os.Build.ID);
			userAgentStr.append(", MANUFACTURER: "
					+ android.os.Build.MANUFACTURER);
			userAgentStr.append(", USER: " + android.os.Build.USER);
		}
		return userAgentStr.toString();
	}
}
